<html><!-- Created using the cpp_pretty_printer from the dlib C++ library.  See http://dlib.net for updates. --><head><title>dlib C++ Library - load_image_abstract.h</title></head><body bgcolor='white'><pre>
<font color='#009900'>// Copyright (C) 2011  Davis E. King (davis@dlib.net), Nils Labugt
</font><font color='#009900'>// License: Boost Software License   See LICENSE.txt for the full license.
</font><font color='#0000FF'>#undef</font> DLIB_LOAd_IMAGE_ABSTRACT_
<font color='#0000FF'>#ifdef</font> DLIB_LOAd_IMAGE_ABSTRACT_

<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='load_image_abstract.h.html'>load_image_abstract.h</a>"
<font color='#0000FF'>#include</font> "<a style='text-decoration:none' href='../string.h.html'>../string.h</a>"

<font color='#0000FF'>namespace</font> dlib
<b>{</b>
    <font color='#0000FF'>template</font> <font color='#5555FF'>&lt;</font><font color='#0000FF'>typename</font> image_type<font color='#5555FF'>&gt;</font>
    <font color='#0000FF'><u>void</u></font> <b><a name='load_image'></a>load_image</b> <font face='Lucida Console'>(</font>
        image_type<font color='#5555FF'>&amp;</font> image,
        <font color='#0000FF'>const</font> std::string<font color='#5555FF'>&amp;</font> file_name
    <font face='Lucida Console'>)</font>;
    <font color='#009900'>/*!
        requires
            - image_type == is an implementation of array2d/array2d_kernel_abstract.h
            - pixel_traits&lt;typename image_type::type&gt; is defined  
        ensures
            - let EXT == the extension of the file given by file_name converted
              to lower case (i.e.  the part of the file after the '.')
            - if (EXT == "png") then
                - performs: load_png(image, file_name);
            - else if (EXT == "jpg" || EXT == "jpeg") then
                - performs: load_jpeg(image, file_name);
            - else if (EXT == "bmp") then
                - performs: load_bmp(image, file_name);
            - else if (EXT == "dng") then
                - performs: load_dng(image, file_name);
            - else
                - throws image_load_error
        throws
            - image_load_error
                This exception is thrown if there is some error that prevents
                us from loading the given image file.
    !*/</font>

<b>}</b>

<font color='#0000FF'>#endif</font> <font color='#009900'>// DLIB_LOAd_IMAGE_ABSTRACT_ 
</font>
 

</pre></body></html>